package com.cf.game.message;

import com.cf.game.message.vo.UserInfo;
import com.cf.game.service.constants.EnumReturnCode;
import com.cf.serialize.Response;

/**
 * game-server-BeanResponse
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/5/8 上午 11:05
 */
public class GameResultResponse extends Response {

    public static Integer type = EnumMessageType.GameResultResponse.getType();

    private UserInfo userInfo;

    private boolean win;

    public GameResultResponse(UserInfo userInfo, boolean win) {
        super("", EnumReturnCode.SUCCESS.getCode());
        this.userInfo = userInfo;
        this.win = win;
    }

    @Override
    public Integer messageType() {
        return type;
    }

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public boolean isWin() {
        return win;
    }

    public void setWin(boolean win) {
        this.win = win;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        GameResultResponse.type = type;
    }
}
